import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '会员id',
    align:"center",
    dataIndex: 'memberId'
   },
   {
    title: '交易类型',
    align:"center",
    dataIndex: 'accountType_dictText'
   },
   {
    title: '正负号',
    align:"center",
    dataIndex: 'addSign_dictText'
   },
   {
    title: '金额',
    align:"center",
    dataIndex: 'money'
   },
   {
    title: '说明信息',
    align:"center",
    dataIndex: 'content'
   },
   {
    title: '关联数据，如关联提现记录等',
    align:"center",
    dataIndex: 'dataId'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: 'tenantId',
    align:"center",
    dataIndex: 'tenantId'
   },
   {
    title: '删除状态(0-正常,1-已删除)',
    align:"center",
    dataIndex: 'delFlag'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "交易类型",
      field: 'accountType',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"account_type"
      },
      colProps: {span: 6},
 	},
	{
      label: "正负号",
      field: 'addSign',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"add_sign"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '会员id',
    field: 'memberId',
    component: 'Input',
  },
  {
    label: '交易类型',
    field: 'accountType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"account_type"
     },
  },
  {
    label: '正负号',
    field: 'addSign',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"add_sign"
     },
  },
  {
    label: '金额',
    field: 'money',
    component: 'InputNumber',
  },
  {
    label: '说明信息',
    field: 'content',
    component: 'Input',
  },
  {
    label: '关联数据，如关联提现记录等',
    field: 'dataId',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: 'tenantId',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '删除状态(0-正常,1-已删除)',
    field: 'delFlag',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}